package com.cdu.supermarket.entity.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;

/**
 * 商品属性定义
 */
@TableName("goods_attribute")
public class GoodsAttribute implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String code;
    @TableField("category_id")
    private Long categoryId;
    @TableField("attr_type")
    private String attrType; // text, number, date, enum
    @TableField("is_required")
    private Boolean isRequired;
    @TableField("sort_order")
    private Integer sortOrder;
    
    @TableField(exist = false)
    private List<GoodsAttributeOption> options;

    public GoodsAttribute() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getAttrType() {
        return attrType;
    }

    public void setAttrType(String attrType) {
        this.attrType = attrType;
    }

    public Boolean getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(Boolean required) {
        isRequired = required;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    public List<GoodsAttributeOption> getOptions() {
        return options;
    }

    public void setOptions(List<GoodsAttributeOption> options) {
        this.options = options;
    }
} 